<{include file="top_v2.html" }>
<style>
    .section-1{padding:10px}
    .section-1 img{width:21%;display: inline-block;margin-bottom: 0.2rem}
    .titles{height: 0.5rem !important;line-height: 0.5rem !important;font-size: 0.25rem !important;color:#434343 !important;}
    .etitle{float: left;width: 73%;overflow: hidden;text-overflow:ellipsis;white-space: nowrap; font-size:0.3rem !important;}
    .edate{float: right;width: 22%;text-align: right;}
    .more{ text-align: center;height: 0.1rem;line-height: 0.1rem;font-size: 0.26rem;display: block;width: 99%;text-decoration: underline;
        color: #8d8d8d;}

</style>
</head>
<body>

<div id="wrap" class="pt pb active-page">
    <div class="header">
        活动相册
        <a href="<{u('index')}>" class="back"></a>
    </div>

    <{foreach from=$events item=info}>
        <div class="section section-1" >
                <p class="titles"><span class="etitle "><{$info.title}></span><span class="edate"><{$info.showListTime|truncate:10:"":true}></span></p>
        </div>
        <div class="section section-1 list">
            <{foreach from=split(',',$photos[$info.id].album) item=pic name=photo}>
                <{if $smarty.foreach.photo.index < 8}>
                <img src="<{$pic}>">
                <{/if}>
            <{/foreach}>
            <{if $photos[$info.id].num gt 8 }>
            <a class="more" href="<{U('photos?eid='|cat:$info.id|cat:'&uid='|cat:$uid )}>">查看该活动所有照片</a>
            <{/if}>
        </div>
    <{/foreach}>

<script>
    $('.list img').on("click",function(){
        var src=$(this).attr('src');
        var urlArr=new Array();
        $(this).parent().find('img').each(function(){
            urlArr.push($(this).attr("src"));
    })
        wx.previewImage({
            current:src,
            urls: urlArr // 需要预览的图片http链接列表
                    });

    })

</script>


</body>
</html>
